<template>
	<!-- 精选班级 -->
	<view class="b-homelist">
		<view class="listcontent" v-for="(item,index) in itemList" :key="index">
			<image class="images" src="../../static/img/99.png"></image>
			<view class="right">
				<view class="wenzi">
					{{item}}
				</view>
				<view class="icon" @click="fnNavgateTo(index)">
					 <view class="btn">进入</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			itemList:{}
			
		},
		data(){
			return{
				title: 'Hello',
				ClassList:["每日英语","天天练习","古诗100首"]
			}
		},
		
		methods:{
			fnNavgateTo(index){
				if(uni.getStorageSync("userinfo")){
					uni.navigateTo({
						url:'../src/daka/daka'
					})
				}else{
					uni.navigateTo({
						url:'../mylogin/mylogin'
					})
				}
			}
		}
	}
</script>

<style lang="scss">
	.b-homelist{
		width: 100%;
		//padding: 10px;
		display: flex;
		flex-direction: column;
		align-items: center;
		//background-color: #2C405A;
		.listcontent{
			width: 100%;
			padding: 10px 0;
			background-color: #fff;
			margin-bottom: 10px;
			display: flex;
			align-items: center;
			box-shadow:  0 2px 2px #ccc;
			border-radius: 5px;
			.images{
				width: 70px;
				height: 70px;
				margin:0 10px;
			}
			.right{
				display: flex;
				flex: 1;
				justify-content: space-between;
				.wenzi{
					flex: 1;
					font-size: 14px;
					color: #505050;
					font-weight: 600;
					display: flex;
					align-items: center;
					//background: #007AFF;
				}
				.icon{
					display: flex;
					align-items: center;
					justify-content: center;
				//	background-color: #007AFF;
					//padding: 5px;
					width: 80px;
					.btn{
						width: 50px;
						height: 25px;
						font-size: 12px;
						background-color: #ffad33;
						margin: 10px;
						display: flex;
						align-items: center;
						justify-content: center;
						border-radius: 5px;
						color: #fff;
						&:active{
							background-color: #ff9900;
						}
					}
					
				}
			}
		}
		
	}
</style>
